package com.itheima.demo01;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;


public class Demo02 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
        Class clazz = Class.forName("com.itheima.demo01.Student");
        Method show = clazz.getDeclaredMethod("show1", String.class);
        Student student = (Student) clazz.newInstance();
        show.invoke(student,"aaa");
    }
}
